/*
 * @Author: your name
 * @Date: 2021-08-25 17:46:12
 * @LastEditTime: 2021-09-23 11:21:37
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \uniapp-cil\src\main.js
 */
import Vue from 'vue'
import App from './App'
import store from './store'
Vue.config.productionTip = false

App.mpType = 'app'

import uView from "uview-ui"
Vue.use(uView)

import uMixin from '@/store/uMixin.js'
Vue.mixin(uMixin)

// animate.css 动画库
// import animate from 'animate.css'
// Vue.use(animate)

// #ifdef MP-WEIXIN  
// 引入uView对小程序分享的mixin封装
let mpShare = require('uview-ui/libs/mixin/mpShare.js')
Vue.mixin(mpShare)
    // #endif


const app = new Vue({
    ...App,
    store
})

/* interceptor 请求拦截*/
import httpInterceptor from '@/common/js/http.interceptor.js'
// 这里需要写在最后，是为了等Vue创建对象完成，引入"app"对象(也即页面的"this"实例)
Vue.use(httpInterceptor, app)

// $x对象绑定
import x from '@/common/js/index.js'
Vue.use(x, app)

// 过滤器
import * as filters from '@/common/js/filter.js'
Object.keys(filters).map(key => {
    Vue.filter(key, filters[key])
})

app.$mount()